\(\int \frac {1}{\sqrt {a+\frac {c}{x^2}+\frac {b}{x}}} \, dx\) [452]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [F]
   Giac [F(-2)]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 16, antiderivative size = 67 \[ \int \frac {1}{\sqrt {a+\frac {c}{x^2}+\frac {b}{x}}} \, dx=\frac {\sqrt {a+\frac {c}{x^2}+\frac {b}{x}} x}{a}-\frac {b \text {arctanh}\left (\frac {2 a+\frac {b}{x}}{2 \sqrt {a} \sqrt {a+\frac {c}{x^2}+\frac {b}{x}}}\right )}{2 a^{3/2}} \]

[Out]

-1/2*b*arctanh(1/2*(2*a+b/x)/a^(1/2)/(a+c/x^2+b/x)^(1/2))/a^(3/2)+x*(a+c/x^2+b/x)^(1/2)/a

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 67, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {1356, 744, 738, 212} \[ \int \frac {1}{\sqrt {a+\frac {c}{x^2}+\frac {b}{x}}} \, dx=\frac {x \sqrt {a+\frac {b}{x}+\frac {c}{x^2}}}{a}-\frac {b \text {arctanh}\left (\frac {2 a+\frac {b}{x}}{2 \sqrt {a} \sqrt {a+\frac {b}{x}+\frac {c}{x^2}}}\right )}{2 a^{3/2}} \]

[In]

Int[1/Sqrt[a + c/x^2 + b/x],x]

[Out]

(Sqrt[a + c/x^2 + b/x]*x)/a - (b*ArcTanh[(2*a + b/x)/(2*Sqrt[a]*Sqrt[a + c/x^2 + b/x])])/(2*a^(3/2))

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 738

Int[1/(((d_.) + (e_.)*(x_))*Sqrt[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2]), x_Symbol] :> Dist[-2, Subst[Int[1/(4*c*d
^2 - 4*b*d*e + 4*a*e^2 - x^2), x], x, (2*a*e - b*d - (2*c*d - b*e)*x)/Sqrt[a + b*x + c*x^2]], x] /; FreeQ[{a,
b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[2*c*d - b*e, 0]

Rule 744

Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[e*(d + e*x)^(m + 1)*
((a + b*x + c*x^2)^(p + 1)/((m + 1)*(c*d^2 - b*d*e + a*e^2))), x] + Dist[(2*c*d - b*e)/(2*(c*d^2 - b*d*e + a*e
^2)), Int[(d + e*x)^(m + 1)*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m, p}, x] && NeQ[b^2 - 4*a*c,
 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && NeQ[2*c*d - b*e, 0] && EqQ[m + 2*p + 3, 0]

Rule 1356

Int[((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> -Subst[Int[(a + b/x^n + c/x^(2*n))^p/x^2,
x], x, 1/x] /; FreeQ[{a, b, c, p}, x] && EqQ[n2, 2*n] && ILtQ[n, 0]

Rubi steps \begin{align*} \text {integral}& = -\text {Subst}\left (\int \frac {1}{x^2 \sqrt {a+b x+c x^2}} \, dx,x,\frac {1}{x}\right ) \\ & = \frac {\sqrt {a+\frac {c}{x^2}+\frac {b}{x}} x}{a}+\frac {b \text {Subst}\left (\int \frac {1}{x \sqrt {a+b x+c x^2}} \, dx,x,\frac {1}{x}\right )}{2 a} \\ & = \frac {\sqrt {a+\frac {c}{x^2}+\frac {b}{x}} x}{a}-\frac {b \text {Subst}\left (\int \frac {1}{4 a-x^2} \, dx,x,\frac {2 a+\frac {b}{x}}{\sqrt {a+\frac {c}{x^2}+\frac {b}{x}}}\right )}{a} \\ & = \frac {\sqrt {a+\frac {c}{x^2}+\frac {b}{x}} x}{a}-\frac {b \tanh ^{-1}\left (\frac {2 a+\frac {b}{x}}{2 \sqrt {a} \sqrt {a+\frac {c}{x^2}+\frac {b}{x}}}\right )}{2 a^{3/2}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.15 (sec) , antiderivative size = 89, normalized size of antiderivative = 1.33 \[ \int \frac {1}{\sqrt {a+\frac {c}{x^2}+\frac {b}{x}}} \, dx=\frac {2 \sqrt {a} (c+x (b+a x))-b \sqrt {c+x (b+a x)} \text {arctanh}\left (\frac {b+2 a x}{2 \sqrt {a} \sqrt {c+x (b+a x)}}\right )}{2 a^{3/2} x \sqrt {a+\frac {c+b x}{x^2}}} \]

[In]

Integrate[1/Sqrt[a + c/x^2 + b/x],x]

[Out]

(2*Sqrt[a]*(c + x*(b + a*x)) - b*Sqrt[c + x*(b + a*x)]*ArcTanh[(b + 2*a*x)/(2*Sqrt[a]*Sqrt[c + x*(b + a*x)])])
/(2*a^(3/2)*x*Sqrt[a + (c + b*x)/x^2])

Maple [A] (verified)

Time = 0.05 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.31

method result size
default \(\frac {\sqrt {a \,x^{2}+b x +c}\, \left (2 \sqrt {a \,x^{2}+b x +c}\, a^{\frac {3}{2}}-b \ln \left (\frac {2 \sqrt {a \,x^{2}+b x +c}\, \sqrt {a}+2 a x +b}{2 \sqrt {a}}\right ) a \right )}{2 \sqrt {\frac {a \,x^{2}+b x +c}{x^{2}}}\, x \,a^{\frac {5}{2}}}\) \(88\)
risch \(\frac {a \,x^{2}+b x +c}{a \sqrt {\frac {a \,x^{2}+b x +c}{x^{2}}}\, x}-\frac {b \ln \left (\frac {\frac {b}{2}+a x}{\sqrt {a}}+\sqrt {a \,x^{2}+b x +c}\right ) \sqrt {a \,x^{2}+b x +c}}{2 a^{\frac {3}{2}} \sqrt {\frac {a \,x^{2}+b x +c}{x^{2}}}\, x}\) \(97\)

[In]

int(1/(a+c/x^2+b/x)^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/2*(a*x^2+b*x+c)^(1/2)*(2*(a*x^2+b*x+c)^(1/2)*a^(3/2)-b*ln(1/2*(2*(a*x^2+b*x+c)^(1/2)*a^(1/2)+2*a*x+b)/a^(1/2
))*a)/((a*x^2+b*x+c)/x^2)^(1/2)/x/a^(5/2)

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 171, normalized size of antiderivative = 2.55 \[ \int \frac {1}{\sqrt {a+\frac {c}{x^2}+\frac {b}{x}}} \, dx=\left [\frac {4 \, a x \sqrt {\frac {a x^{2} + b x + c}{x^{2}}} + \sqrt {a} b \log \left (-8 \, a^{2} x^{2} - 8 \, a b x - b^{2} - 4 \, a c + 4 \, {\left (2 \, a x^{2} + b x\right )} \sqrt {a} \sqrt {\frac {a x^{2} + b x + c}{x^{2}}}\right )}{4 \, a^{2}}, \frac {2 \, a x \sqrt {\frac {a x^{2} + b x + c}{x^{2}}} + \sqrt {-a} b \arctan \left (\frac {{\left (2 \, a x^{2} + b x\right )} \sqrt {-a} \sqrt {\frac {a x^{2} + b x + c}{x^{2}}}}{2 \, {\left (a^{2} x^{2} + a b x + a c\right )}}\right )}{2 \, a^{2}}\right ] \]

[In]

integrate(1/(a+c/x^2+b/x)^(1/2),x, algorithm="fricas")

[Out]

[1/4*(4*a*x*sqrt((a*x^2 + b*x + c)/x^2) + sqrt(a)*b*log(-8*a^2*x^2 - 8*a*b*x - b^2 - 4*a*c + 4*(2*a*x^2 + b*x)
*sqrt(a)*sqrt((a*x^2 + b*x + c)/x^2)))/a^2, 1/2*(2*a*x*sqrt((a*x^2 + b*x + c)/x^2) + sqrt(-a)*b*arctan(1/2*(2*
a*x^2 + b*x)*sqrt(-a)*sqrt((a*x^2 + b*x + c)/x^2)/(a^2*x^2 + a*b*x + a*c)))/a^2]

Sympy [F]

\[ \int \frac {1}{\sqrt {a+\frac {c}{x^2}+\frac {b}{x}}} \, dx=\int \frac {1}{\sqrt {a + \frac {b}{x} + \frac {c}{x^{2}}}}\, dx \]

[In]

integrate(1/(a+c/x**2+b/x)**(1/2),x)

[Out]

Integral(1/sqrt(a + b/x + c/x**2), x)

Maxima [F]

\[ \int \frac {1}{\sqrt {a+\frac {c}{x^2}+\frac {b}{x}}} \, dx=\int { \frac {1}{\sqrt {a + \frac {b}{x} + \frac {c}{x^{2}}}} \,d x } \]

[In]

integrate(1/(a+c/x^2+b/x)^(1/2),x, algorithm="maxima")

[Out]

integrate(1/sqrt(a + b/x + c/x^2), x)

Giac [F(-2)]

Exception generated. \[ \int \frac {1}{\sqrt {a+\frac {c}{x^2}+\frac {b}{x}}} \, dx=\text {Exception raised: TypeError} \]

[In]

integrate(1/(a+c/x^2+b/x)^(1/2),x, algorithm="giac")

[Out]

Exception raised: TypeError >> an error occurred running a Giac command:INPUT:sage2:=int(sage0,sageVARx):;OUTP
UT:Error: Bad Argument Type

Mupad [B] (verification not implemented)

Time = 8.58 (sec) , antiderivative size = 53, normalized size of antiderivative = 0.79 \[ \int \frac {1}{\sqrt {a+\frac {c}{x^2}+\frac {b}{x}}} \, dx=\frac {x\,\sqrt {a+\frac {b}{x}+\frac {c}{x^2}}}{a}-\frac {b\,\mathrm {atanh}\left (\frac {a+\frac {b}{2\,x}}{\sqrt {a}\,\sqrt {a+\frac {b}{x}+\frac {c}{x^2}}}\right )}{2\,a^{3/2}} \]

[In]

int(1/(a + b/x + c/x^2)^(1/2),x)

[Out]

(x*(a + b/x + c/x^2)^(1/2))/a - (b*atanh((a + b/(2*x))/(a^(1/2)*(a + b/x + c/x^2)^(1/2))))/(2*a^(3/2))